import cadastros.fornecedores;
import cadastros.funcionarios;
import relatorios.RelatorioGeral;
import utilitarios.data;
/**
 *
 * @author Giovane
 */
public class TelaPrincipal extends javax.swing.JFrame {
    data mostra_data;
    /** Creates new form TelaPrincipal */
    public TelaPrincipal() {
        initComponents();
        mostra_data = new data();
        mostra_data.le_data();
       label_data.setText(mostra_data.dia_semana+", "+mostra_data.dia+" de "+mostra_data.mes+" de "+mostra_data.ano);

   timer1.start();

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        timer1 = new org.netbeans.examples.lib.timerbean.Timer();
        Logo_centro = new javax.swing.JLabel();
        Autor = new javax.swing.JLabel();
        Matricula = new javax.swing.JLabel();
        label_data = new javax.swing.JLabel();
        label_hora = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        menu_cadastros = new javax.swing.JMenu();
        menu_cliente = new javax.swing.JMenuItem();
        menu_fornecedores = new javax.swing.JMenuItem();
        menu_funcionario = new javax.swing.JMenuItem();
        menu_cidades = new javax.swing.JMenuItem();
        menu_estoque = new javax.swing.JMenu();
        menu_implantacao = new javax.swing.JMenuItem();
        menu_entrada = new javax.swing.JMenuItem();
        menu_saida = new javax.swing.JMenuItem();
        menu_consultas = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        menu_relatorios = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        menu_utilitarios = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        menu_sair = new javax.swing.JMenu();

        timer1.addTimerListener(new org.netbeans.examples.lib.timerbean.TimerListener() {
            public void onTime(java.awt.event.ActionEvent evt) {
                timer1OnTime(evt);
            }
        });

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SISTEMA AXO");
        setResizable(false);

        Logo_centro.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        Logo_centro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/capa.png"))); // NOI18N
        Logo_centro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        Autor.setFont(new java.awt.Font("Tahoma", 0, 12));
        Autor.setText("Sistema Desenvolvido por Giovane Mastrantonio");

        Matricula.setFont(new java.awt.Font("Tahoma", 0, 12));
        Matricula.setText("Matr.:45707");

        label_data.setText("Data:");

        label_hora.setText("Hora:");

        menu_cadastros.setMnemonic('C');
        menu_cadastros.setText("Cadastros");
        menu_cadastros.setFont(new java.awt.Font("Segoe UI", 0, 18));

        menu_cliente.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        menu_cliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/usuario.png"))); // NOI18N
        menu_cliente.setText("Cliente");
        menu_cliente.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                menu_clienteMouseClicked(evt);
            }
        });
        menu_cliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu_clienteActionPerformed(evt);
            }
        });
        menu_cadastros.add(menu_cliente);

        menu_fornecedores.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        menu_fornecedores.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/fornecedor.png"))); // NOI18N
        menu_fornecedores.setText("Fornecedores");
        menu_fornecedores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu_fornecedoresActionPerformed(evt);
            }
        });
        menu_cadastros.add(menu_fornecedores);

        menu_funcionario.setFont(new java.awt.Font("Segoe UI", 0, 18));
        menu_funcionario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/varios.png"))); // NOI18N
        menu_funcionario.setText("Funcionários");
        menu_funcionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu_funcionarioActionPerformed(evt);
            }
        });
        menu_cadastros.add(menu_funcionario);

        menu_cidades.setFont(new java.awt.Font("Segoe UI", 0, 18));
        menu_cidades.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/cidades.png"))); // NOI18N
        menu_cidades.setText("Produto");
        menu_cidades.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu_cidadesActionPerformed(evt);
            }
        });
        menu_cadastros.add(menu_cidades);

        jMenuBar1.add(menu_cadastros);

        menu_estoque.setMnemonic('E');
        menu_estoque.setText("Estoque");
        menu_estoque.setFont(new java.awt.Font("Segoe UI", 0, 18));

        menu_implantacao.setFont(new java.awt.Font("Segoe UI", 0, 18));
        menu_implantacao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/folha.png"))); // NOI18N
        menu_implantacao.setText("Implantação");
        menu_estoque.add(menu_implantacao);

        menu_entrada.setFont(new java.awt.Font("Segoe UI", 0, 18));
        menu_entrada.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/enviar.png"))); // NOI18N
        menu_entrada.setText("Entrada");
        menu_estoque.add(menu_entrada);

        menu_saida.setFont(new java.awt.Font("Segoe UI", 0, 18));
        menu_saida.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/relatorio.png"))); // NOI18N
        menu_saida.setText("Saída");
        menu_estoque.add(menu_saida);

        jMenuBar1.add(menu_estoque);

        menu_consultas.setMnemonic('N');
        menu_consultas.setText("Consultas");
        menu_consultas.setFont(new java.awt.Font("Segoe UI", 0, 18));

        jMenuItem1.setFont(new java.awt.Font("Segoe UI", 0, 18));
        jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/produto.png"))); // NOI18N
        jMenuItem1.setText("Estoque");
        menu_consultas.add(jMenuItem1);

        jMenuBar1.add(menu_consultas);

        menu_relatorios.setMnemonic('R');
        menu_relatorios.setText("Relatórios");
        menu_relatorios.setFont(new java.awt.Font("Segoe UI", 0, 18));

        jMenuItem2.setFont(new java.awt.Font("Segoe UI", 0, 18));
        jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/editar.png"))); // NOI18N
        jMenuItem2.setText("Geral");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        menu_relatorios.add(jMenuItem2);

        jMenuBar1.add(menu_relatorios);

        menu_utilitarios.setMnemonic('U');
        menu_utilitarios.setText("Utilitarios");
        menu_utilitarios.setFont(new java.awt.Font("Segoe UI", 0, 18));

        jMenuItem3.setFont(new java.awt.Font("Segoe UI", 0, 18));
        jMenuItem3.setText("Calculadora");
        menu_utilitarios.add(jMenuItem3);

        jMenuBar1.add(menu_utilitarios);

        menu_sair.setMnemonic('S');
        menu_sair.setText("Sair");
        menu_sair.setFont(new java.awt.Font("Segoe UI", 0, 18));
        menu_sair.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                menu_sairMouseClicked(evt);
            }
        });
        menu_sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu_sairActionPerformed(evt);
            }
        });
        jMenuBar1.add(menu_sair);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(Autor)
                            .addComponent(Matricula)))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addGap(66, 66, 66)
                            .addComponent(label_data)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(label_hora)
                            .addGap(14, 14, 14))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addGap(248, 248, 248)
                            .addComponent(Logo_centro))))
                .addContainerGap(252, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(156, Short.MAX_VALUE)
                .addComponent(Logo_centro)
                .addGap(33, 33, 33)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(label_data)
                    .addComponent(label_hora, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(87, 87, 87)
                .addComponent(Autor)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(Matricula)
                .addContainerGap())
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-800)/2, (screenSize.height-600)/2, 800, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void menu_clienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_clienteActionPerformed

    }//GEN-LAST:event_menu_clienteActionPerformed

    private void menu_cidadesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_cidadesActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_menu_cidadesActionPerformed

    private void timer1OnTime(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timer1OnTime
    mostra_data.le_hora();
    label_hora.setText("Hora atual "+mostra_data.hora);
    }//GEN-LAST:event_timer1OnTime

    private void menu_sairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_sairActionPerformed
    
    }//GEN-LAST:event_menu_sairActionPerformed

    private void menu_sairMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_menu_sairMouseClicked
    System.exit(0);
    }//GEN-LAST:event_menu_sairMouseClicked

    private void menu_fornecedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_fornecedoresActionPerformed
    new fornecedores().show();
    }//GEN-LAST:event_menu_fornecedoresActionPerformed

    private void menu_clienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_menu_clienteMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_menu_clienteMouseClicked

    private void menu_funcionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_funcionarioActionPerformed
    new funcionarios().show();
    }//GEN-LAST:event_menu_funcionarioActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
    new RelatorioGeral().show();
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaPrincipal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Autor;
    private javax.swing.JLabel Logo_centro;
    private javax.swing.JLabel Matricula;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    public javax.swing.JLabel label_data;
    public javax.swing.JLabel label_hora;
    private javax.swing.JMenu menu_cadastros;
    private javax.swing.JMenuItem menu_cidades;
    private javax.swing.JMenuItem menu_cliente;
    private javax.swing.JMenu menu_consultas;
    private javax.swing.JMenuItem menu_entrada;
    private javax.swing.JMenu menu_estoque;
    private javax.swing.JMenuItem menu_fornecedores;
    private javax.swing.JMenuItem menu_funcionario;
    private javax.swing.JMenuItem menu_implantacao;
    private javax.swing.JMenu menu_relatorios;
    private javax.swing.JMenuItem menu_saida;
    private javax.swing.JMenu menu_sair;
    private javax.swing.JMenu menu_utilitarios;
    private org.netbeans.examples.lib.timerbean.Timer timer1;
    // End of variables declaration//GEN-END:variables

}
